<h2>Producer Messages</h2>
<a href="{{=URL('default','post_list',args=session.organization['id'])}}">Edit Messages</a>
<div style="overflow:auto;height:150px;width:100%">
<table style="width:100%">
  <tr>
		<th>Message</th>
		<th>Time</th>
		<th>Action</th>
	</tr>
{{for h,item in enumerate(posts):}}
	<tr class="{{='odd' if h%2 else 'even'}}">
		<td>{{=item['body']}}</td>

{{
import datetime
offset = datetime.timedelta(hours=6)
p  = item['created_on']
p = p - offset
}}

<td><span style="align:right">{{=p.strftime('%H:%M:%S')}}</span></td>

		<!-- td><span style="align:right">{{=item['created_on'].strftime('%H:%M:%S')}}</span></td -->
		<td><a class="producer_message" data-id="{{=item.id}}" href="#">Hide</a></td>
	</tr><!-- .timedelta(hours=-6) -->
{{pass}}
</table>
</div>

<script type="text/javascript">
refreshing_widgets.push("post_list");
</script>
